import java.util.Arrays;

/**
 * @Author 12629
 * @Description：
 */


public class TestDemo {

    public static void main(String[] args) {
        MyDate myDate = new MyDate();
        myDate = new MyDate();
        myDate = new MyDate();
        myDate = new MyDate();
        myDate = new MyDate();


        //myDate.printDate();

        System.out.println(myDate);
    }


    public static void swap(MyValue myVal1,MyValue myVal2) {
        int tmp = myVal1.val;
        myVal1.val = myVal2.val;
        myVal2.val = tmp;
    }

    public static void main6(String[] args) {
        MyValue myValue1 = new MyValue();
        myValue1.val = 10;

        MyValue myValue2 = new MyValue();
        myValue2.val = 20;


        System.out.println("交换前"+myValue1.val+" " + myValue2.val);

        swap(myValue1,myValue2);

        System.out.println("交换后"+myValue1.val+" " + myValue2.val);


    }

    public static void main5(String[] args) {


        MyDate myDate = new MyDate();
        myDate.setDate(2025,5,25);
        myDate.printDate();

        MyDate myDate2 = new MyDate();
        myDate2.setDate(2026,3,6);
        myDate2.printDate();

        MyDate myDate3 = new MyDate();
        myDate3.setDate(2027,5,25);
        myDate3.printDate();

    }


    public static void main4(String[] args) {
        int a = 10;

        Dog dog1 = new Dog();
        dog1.name = "旺财";
        dog1.age = 10;
        dog1.brand = "金毛";

        System.out.println(dog1.name);
        dog1.eat();
        dog1.sleep();
        dog1.bark();



       /* Dog dog2 = new Dog();

        Dog dog3 = new Dog();
*/
    }

    public static void main3(String[] args) {
        int[][] array = new int[2][];
        array[0] = new int[3];
        array[1] = new int[5];

        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array[i].length; j++) {
                System.out.print(array[i][j]+" ");
            }
            System.out.println();
        }
    }

    public static void main2(String[] args) {
        int[][] array = {{1,2,3},{4,5,6}};

        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array[i].length; j++) {
                System.out.print(array[i][j]+" ");
            }
            System.out.println();
        }

        System.out.println("行数："+array.length);
        System.out.println("列数："+array[0].length);
        System.out.println("====================");


        for(int[] tmpArray : array) {
            for(int x : tmpArray) {
                System.out.print(x+" ");
            }
            System.out.println();
        }
        System.out.println("====================");

        System.out.println(Arrays.deepToString(array));

    }


    public static void main1(String[] args) {
        int[][] array = {{1,2,3},{4,5,6}};

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < 3; j++) {
                System.out.print(array[i][j]+" ");
            }
            System.out.println();
        }

        int[][] array2 = new int[][]{{1,2,3},{4,5,6}};

        int[][] array3 = new int[2][3];

    }
}
